<!DOCTYPE html>
<html lang="en">
<#include "../common/base.html" />
<@head "历史任务" />
<body class="nav-md">
<div class="container body">
  <div class="main_container">
    <#include "../common/sidebar.html" />
    <#include "../common/topbar.html" />

    <div class="right_col" role="main">
      <div class="row">
        <div class="col-md-12 col-sm-12 col-xs-12">
          <div class="x_panel">
            <div class="x_title">
              <h2>您的任务历史
                <small>操作记录</small>
              </h2>

              <div class="clearfix"></div>
            </div>

            <div class="x_content">

              <div class="table-responsive">
                <table class="table table-striped jambo_table bulk_action">
                  <thead>
                  <tr class="headings">
                    <th>
                      <input type="checkbox" id="check-all" class="flat">
                    </th>
                    <th class="column-title">任务编号</th>
                    <th class="column-title">创建日期</th>
                    <th class="column-title">上次修改日期</th>
                    <th class="column-title">任务状态</th>
                    <th class="column-title">当前进度</th>
                    <th class="column-title no-link last"><span class="nobr">操作</span>
                    </th>
                    <th class="bulk-actions" colspan="7">
                      <a class="antoo" style="color:#fff; font-weight:500;">Bulk Actions ( <span
                              class="action-cnt"> </span> ) <i class="fa fa-chevron-down"></i></a>
                    </th>
                  </tr>
                  </thead>

                  <#assign flowList = flowPage.entries />
                  <tbody>
                  <#list flowList as flow>
                    <tr class="even pointer">
                      <td class="a-center ">
                        <input type="checkbox" class="flat" name="table_records">
                      </td>
                      <td class=" ">${flow.getId()}</td>
                      <td class=" ">${flow.getCreateAt()}</td>
                      <td class=" ">${flow.getUpdateAt()}</td>
                      <td class=" ">

                        <#switch flow.getStatus().ordinal()>
                          <#case 0>
                            创建成功
                            <#break>
                              <#case 1>
                                数据就绪
                                <#break>
                                  <#case 2>
                                    筛选完毕
                                    <#break>
                                      <#case 3>
                                        解析中
                                        <#break>
                                          <#case 4>
                                            解析完毕
                                            <#break>
                                              <#case 5>
                                                已关闭
                                                <#break>
                                                  <#default >
                                                    非法状态
                        </#switch>

                      </td>
                      <td class="a-right a-right ">${flow.getProgress()}</td>
                      <td class=" last">
                        <a href="/flows/${flow.getId()}.html"
                        <#if flow.getStatus().ordinal() gte 5>
                          disabled="disabled"
                        </#if>
                           class="btn btn-primary">查看</a>
                      </td>
                    </tr>
                  </#list>

                  </tbody>
                </table>
              </div>
            </div>

            <br/>

          </div>
        </div>
      </div>
    </div>
  </div>
</div>


<@dep ["../vendors/fastclick/lib/fastclick.js","../vendors/nprogress/nprogress.js","../vendors/iCheck/icheck.min.js"] />

<script>
  window.pageInfo = {
    "pageNumber":${flowPage.page},
    "pageSize":${flowPage.pageSize},
    "totalPages":${flowPage.totalPages},
    "totalNum":${flowPage.totalSize}
  };

  console.log(window.pageInfo);
</script>
<script src="/js/packages/require.js" data-main="/js/flow/list"></script>


</body>
</html>